home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9201.ARJ / 1001110A < prev    next >
Text File  |  1992-06-02  |  2KB  |  79 lines

  1.  
  2. #
  3. # t.mnu (compiles into t.mnc):
  4. # Top level menu for CMENU test system. To test this menu,
  5. # start in a test directory /u/myname/menu, and 
  6. # put the command script "test.sh" into the this directory.
  7. # Then create a subdirectory named "/u/myname/menu/test"
  8. # and put the  object file for menu t2 (t2.mnc) in it.
  9. #
  10.  
  11. menu:                   
  12.     title "The MAIN Menu"       # menu title appears at top
  13.     escape                      # allow shell escapes
  14.     spacing 2                   # double space the entries
  15.  
  16.     item:
  17.         "Run test.sh"
  18.         help 'next item is "zot"'
  19.         action "test.sh"        # after the "speed" program runs,
  20.         nextitem zot            # item "zot" (below) is highlighted
  21.  
  22.     item:
  23.         "Run External Menu t2"
  24.         path "test"             # run menu "t2", found in 
  25.         emenu "t2"              # subdirectory "test".
  26.  
  27.     item:
  28.         "run a Unix shell"
  29.         action "exec sh"        # most efficient with "exec"
  30.  
  31.     item:
  32.         "run shell, no exec."   # creates an extra process. 
  33.         action sh               # (note: quotes not really needed)
  34.  
  35.     item zot:
  36.         'ITEM "Zot": list the directory (in reverse chron. order)'
  37.         help 'this is a help line for #2, "ZOT"'
  38.         action "ls -t"
  39.         prompt                  # prompt user before continuing
  40.  
  41.     item
  42.         text "Do a long directly listing (no prompt)"
  43.         help "the next item should ALSO be zot"
  44.         action "l"
  45.         nextitem zot
  46.  
  47.     item
  48.         text "GO TO MENU BAR"   # invoke a locally defined menu
  49.         lmenu bar
  50.  
  51.     item
  52.         text "filler"           # clone this entry several times
  53.         action "ls"             # to see automatic multiple columns
  54.  
  55.     item
  56.         text "filler"           # clone this entry several times
  57.         action "ls"             # to see automatic multiple columns
  58. endmenu
  59.  
  60.  
  61. menu bar:
  62.   title "This is local menu BAR.  shell escpaes won't work."
  63.   noescape
  64.   path "/usr/bin"
  65.  
  66.     item
  67.         text "here is the first item of menu BAR"
  68.         action "ls"; prompt     # semi OK as separator
  69.     
  70.     item
  71.         text "here is the next item of menu BAR"
  72.         action "ls" prompt      # so is a space
  73.  
  74.     item
  75.         text "here is the LAST item of the menu BAR (with help)"
  76.         help "this is help for the LAST item of menu BAR"
  77.         action "ls"
  78. endmenu
  79.